package com.example.sprintboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.sprintboot.entity.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface OrderItemMapper extends BaseMapper<OrderItem> {
    // 查询某订单的所有订单项
    List<OrderItem> selectByOrderId(@Param("orderId") Integer orderId);

    // 批量插入订单项
    int batchInsert(@Param("items") List<OrderItem> items);

    int deleteByOrderId(@Param("orderId") Integer orderId);
} 